set more off 
mata: mata set matafavor speed, perm

use "E:\隨身硬碟備份\E\TRY\findev_2017\Fin_Co2_pol_2020\program\n82_4y_8417_renew.dta",clear
tsset id period

***Table 1.Linear effects of financial development and structure***

**CO2 per capita**
*column(1). size, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devsz c.lnav_strsz sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.lnav_devsz, lag(1 1)collapse)    ///
gmm(c.lnav_strsz, lag(1 1))    ///
gmm(c.sc_right,   lag(1 1))    ///
gmm(c.lnav_gdp,   lag(1 1))  gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///
twostep small

*column(2). activity, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devac c.lnav_strac sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.lnav_devac, lag(1 1)) gmm(c.lnav_strac, lag(1 2)) ///
gmm(c.sc_right,   lag(1 1)  collapse) ///
gmm(c.lnav_gdp,   lag(1 1)) gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///
twostep small

*column(3). efficiency, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devef c.lnav_stref sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0,  ///
gmm(c.lnav_devef, lag(1 3))         ///
gmm(c.lnav_stref, lag(2 3)collapse) ///
gmm(c.sc_right,   lag(1 2)collapse) ///
gmm(c.lnav_gdp,lag(1 2)) gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///  
twostep small

*column(4). aggregate, CV and CO2*
xtabond2 lnav_co2pc c.fin_dev c.fin_str sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0,  ///
gmm(c.fin_dev,  lag(1 1))           ///
gmm(c.fin_str,  lag(1 1)orthogonal) ///
gmm(c.sc_right, lag(2 2)collapse)   ///
gmm(c.lnav_gdp, lag(1 2)) gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///  
twostep small

**Energy use per capita**
*column(5). aggregate, CV and Energy use*
xtabond2 lnav_engpc c.fin_dev c.fin_str c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_engpc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(2 2))    ///
gmm(c.fin_str, lag(1 1))    ///
gmm(c.sc_right,lag(1 2))    ///
gmm(c.lnav_gdp,lag(1 1))        gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///  
iv(ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small


**Green technplogy per capita**
*column(6). aggregate, CV and Green technplogy*
xtabond2 lnav_techpc c.fin_dev c.fin_str sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_techpc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev,  lag(2 2)orthogonal)            ///
gmm(c.fin_str,  lag(1 1)orthogonal)  ///
gmm(c.sc_right, lag(1 2)collapse)    ///
gmm(c.lnav_gdp, lag(1 3)) gmm(c.lnav_gdp#c.lnav_gdp,lag(2 2)) ///
iv(ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///  
twostep small




log close
clear
